package com.rbac.admin.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 权限实体类
 */
@Data
@TableName("sys_permission")
@Tag(name = "SysPermission", description = "权限实体类")
public class SysPermission implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 权限ID
     */
    @Schema(name = "id", description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 权限名称
     */
    @Schema(name = "permissionName", description = "权限名称")
    private String permissionName;

    /**
     * 权限编码
     */
    @Schema(name = "permissionCode", description = "权限编码")
    private String permissionCode;

    /**
     * 权限类型（1-菜单，2-按钮，3-接口）
     */
    @Schema(name = "permissionType", description = "权限类型（1-菜单，2-按钮，3-接口）")
    private Integer permissionType;

    /**
     * 状态（0-禁用，1-正常）
     */
    @Schema(name = "status", description = "状态（0-禁用，1-正常）")
    private Integer status;

    /**
     * 是否删除（0-未删除，1-已删除）
     */
    @Schema(name = "deleted", description = "是否删除（0-未删除，1-已删除）")
    @TableLogic
    private Integer deleted;

    /**
     * 创建时间
     */
    @Schema(name = "createTime", description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(name = "updateTime", description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    @Schema(name = "remark", description = "备注")
    private String remark;

    @Schema(name = "sortOrder", description = "排序")
    private Integer sortOrder;
}